<script setup>
import {onMounted} from 'vue'

// beforeCreate和create的相关代码一律放在setup里面执行
const getList = () => {
    setTimeout(()=>{
        console.log('执行代码....');
    },2000)
}

getList()

onMounted(()=>{
console.log('mounted生命周期函数-逻辑1');

})

onMounted(()=>{
console.log('mounted生命周期函数-逻辑2');

})
</script>

<template>
    <div></div>
</template>